package com.nbufe.observer.demo2;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @Author Zan
 * @Create 2024/5/29 14:13
 * @ClassName: Client
 * @Description : TODO 请用一句话描述该类的功能
 */
public class Client {

    public static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

    public static void main(String[] args) {

        WeatherData weatherData = new WeatherData(sdf.format(new Date()), 31.2, 17.8, 3, 2);

        Meituan meituan = new Meituan("美团");
        CampusNet campusNet = new CampusNet("校园网");

        weatherData.addObserver(meituan);
        weatherData.addObserver(campusNet);

        weatherData.notifyMsg();
    }
}
